﻿@model IEnumerable<MIS4200_tt240016.Models.Enrollment>

@{
    ViewBag.Title = "Enrollment Index";
}

<h2>Enrollment Index <span class="glyphicon glyphicon-book"></span></h2>

<p>
    @Html.ActionLink("Create New", "Create")
</p>
<table class="table table-bordered">
    <tr class="success">
        <th>
            Class
        </th>
        <th>
            Student Name
        </th>
        <th>
            Class Level
        </th>
        <th>
            Class Required?
        </th>
        <th></th>
    </tr>

@foreach (var item in Model) {
    <tr class="info">
        <td>
            @Html.DisplayFor(modelItem => item.course.description)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.student.studentFull)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.classLevel)
        </td>
        <td>
            @Html.DisplayFor(modelItem => item.classRequired)
        </td>
        <td>
            @Html.ActionLink("Edit", "Edit", new { id=item.enrollmentID }) |
            @Html.ActionLink("Details", "Details", new { id=item.enrollmentID }) |
            @Html.ActionLink("Delete", "Delete", new { id=item.enrollmentID })
        </td>
    </tr>
}

</table>
